CFLAG= -I../third/include -g
LFLAG= -L../third/lib -lz -lprotobuf -lgtest -lsqlite3 -lpthread -lmuduo_net -lmuduo_base
broker_test: broker_test.cc ../mqcommon/msg.pb.cc ../mqcommon/proto.pb.cc ../third/include/muduo/proto/codec.cc
	g++ -std=c++11 -o $@ $^ $(CFLAG) $(LFLAG)


connection_test: connection_test.cc ../mqcommon/msg.pb.cc ../mqcommon/proto.pb.cc
	g++ -std=c++11 -o $@ $^ -I../third/include -lprotobuf -lgtest -lsqlite3 -lpthread -g
channel_test: channel_test.cc ../mqcommon/msg.pb.cc ../mqcommon/proto.pb.cc
	g++ -std=c++11 -o $@ $^ -I../third/include -lprotobuf -lgtest -lsqlite3 -lpthread -g
consumer_test: consumer_test.cc 
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
route_test: route_test.cc 
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
virtualhost_test: virtualhost_test.cc ../mqcommon/msg.pb.cc
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
message_test: message_test.cc ../mqcommon/msg.pb.cc
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
binding_test: binding_test.cc
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
messagequeue_test: messagequeue_test.cc
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
exchange_test: exchange_test.cc
	g++ -std=c++11 -o $@ $^ -lprotobuf -lgtest -lsqlite3 -lpthread -g
file_test: file_test.cc
	g++ -std=c++11 -o $@ $^
clean:
	rm -rf broker_test